Hough Transform

Hough Transform is a voting technique that can be used to solve following questions about finding lines in an image:

  • Given points that belong to a line, what is that line?
  • How many lines are there?
  • Which points belong to which lines?

The main idea behind the Hough Transform is that each edge point (i.e. each pixel found after applying an edge-detecting operator) votes for its compatible lines. Hopefully, the lines that get many votes are valid.

Hough Space

Hough Space is also called parameter space - which enables a different representation of our desired shapes.

The key is that a line in image space represents a point in Hough space because we use the parameters of the line . Similarly, a point in image space represents a line in Hough space.

For a given point , it fits all the lines going thought it with equation , thus it becomes which is a line in Hough space.

Multiple Points

If we have two points, we can determine the line passing thought both of them in Cartesian space using:

where as we know :

Similarly, a bunch of points produces a bunch of lines in Hough, all of which intersect in one place. The closer the points are to a particular line of best fit, the closer their points of intersection in Hough space.

image-20210112222744974

If we discretize Hough space into "bins" for voting, we end up with the Hough algorithm. In the Hough algorithm, each point in image space votes for every bin along its line in Hough space: the bin with the most votes becomes the line of best fit among the points.

Unfortunately, the representation of lines comes with some problems. For example, a vertical line has . To avoid this, we use Polar Representation of Lines

results matching ""

    No results matching ""